package com.kly.sc.api.application.controller.user.request;

import com.fqgj.common.api.ParamsObject;
import com.fqgj.common.utils.CollectionUtils;
import com.kly.sc.api.infras.exception.ApplicationException;

import java.util.List;
import java.util.Objects;

public class ModelsUserCodeReq extends ParamsObject {

    private List<String> userCodes;

    public List<String> getUserCodes() {
        return userCodes;
    }

    public void setUserCodes(List<String> userCodes) {
        this.userCodes = userCodes;
    }

    @Override
    public void validate() {

        if (CollectionUtils.isEmpty(userCodes)) {
            throw new ApplicationException("The userCodes should not be empty!");
        }

    }
}
